package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.entity.User;
import com.example.entity.vo.RankVo;
import com.example.mapper.UserMapper;
import com.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Administrator
* @description 针对表【wd_user】的数据库操作Service实现
* @createDate 2022-10-18 14:29:41
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{

    @Autowired
    private  UserMapper userMapper;

    @Override
    public List<RankVo> getRank() {
        List<RankVo> rank = userMapper.getRank();
        return rank;
    }

    @Override
    public RankVo getRank(String userId) {
        RankVo oneRank = userMapper.getOneRank(userId);
        return oneRank;
    }
}




